b0072a33bb37b44ff56abfdddc5fdfbb5b7bb62e,PlugIns/PostgresqlPlugIn/Sources/com/webobjects/jdbcadaptor/PostgresqlSynchronizationFactory.java,PostgresqlSynchronizationFactory,primaryKeyConstraintStatementsForEntityGroup,#NSArray#,149

Before Change


        count = entityGroup.count();
        for ( i = 0 ; i < count ; i++ ) {
            entity = (EOEntity)entityGroup.objectAtIndex(i);
            statement = "ALTER TABLE " + entity.externalName() + " ADD CONSTRAINT " + entity.externalName() + "_PK PRIMARY KEY (";
            priKeyAttributes = entity.primaryKeyAttributes();
            priKeyAttributeCount = priKeyAttributes.count();
            for ( j = 0 ; j < priKeyAttributeCount ; j++ ) {

After Change


        for ( i = 0 ; i < count ; i++ ) {
            entity = (EOEntity)entityGroup.objectAtIndex(i);
            StringBuffer statement = new StringBuffer("ALTER TABLE ");
            statement.append(entity.externalName());
            statement.append(" ADD CONSTRAINT ");
            statement.append(entity.externalName());
            statement.append("_PK PRIMARY KEY (");
            priKeyAttributes = entity.primaryKeyAttributes();
            priKeyAttributeCount = priKeyAttributes.count();
            for ( j = 0 ; j < priKeyAttributeCount ; j++ ) {
                priKeyAttribute = (EOAttribute)priKeyAttributes.objectAtIndex(j);
                statement.append(priKeyAttribute.columnName());
                if ( j < priKeyAttributeCount - 1 ) {
                    statement.append(", ");
                } else {
                    statement.append(")");
                }